using System;
using System.Collections.Generic;


namespace Gfw.Models.Stock
{
    [Serializable]
    public partial class StkUseraccount : IEquatable<StkUseraccount>
    {

        #region Private Members

        private string _userid;
        private decimal _stockmoney;
        private decimal _stockcount;
        private DateTime? _activationdate;
        private int _islock;
        private decimal _originalstockcount;
        private decimal _maxownedmoney;

        private decimal _firsttimeprice;
        private decimal _nextautosellprice;
        private decimal _lastautosellprice;
        #endregion

        #region Constructor

        public StkUseraccount()
        {
            _userid = String.Empty;
            _stockmoney = 0;
            _stockcount = 0;
            _activationdate = null;
            _islock = 0;
            _originalstockcount = 0;
            _maxownedmoney = 0;
            _firsttimeprice = 0;
            _nextautosellprice = 0; _lastautosellprice = 0;
        }
        #endregion // End of Default ( Empty ) Class Constuctor

        #region Public Properties

        public virtual string UserId
        {
            get
            {
                return _userid;
            }

            set
            {
                if (value == null)
                    throw new ArgumentOutOfRangeException("Null value not allowed for UserId", value, "null");

                if (value.Length > 40)
                    throw new ArgumentOutOfRangeException("Invalid value for UserId", value, value.ToString());

                _userid = value;
            }
        }

        public virtual decimal StockMoney
        {
            get
            {
                return _stockmoney;
            }
            set
            {
                _stockmoney = value;
            }

        }

        public virtual decimal StockCount
        {
            get
            {
                return _stockcount;
            }
            set
            {
                _stockcount = value;
            }

        }

        public virtual DateTime? ActivationDate
        {
            get
            {
                return _activationdate;
            }
            set
            {
                _activationdate = value;
            }

        }

        public virtual int IsLock
        {
            get
            {
                return _islock;
            }
            set
            {
                _islock = value;
            }

        }

        public virtual decimal OriginalStockCount
        {
            get
            {
                return _originalstockcount;
            }
            set
            {
                _originalstockcount = value;
            }

        }

        public virtual decimal MaxOwnedMoney
        {
            get
            {
                return _maxownedmoney;
            }
            set
            {
                _maxownedmoney = value;
            }

        }
        public virtual decimal FirstTimePrice
        {
            get
            {
                return _firsttimeprice;
            }
            set
            {
                _firsttimeprice = value;
            }

        }

        public virtual decimal NextAutoSellPrice
        {
            get
            {
                return _nextautosellprice;
            }
            set
            {
                _nextautosellprice = value;
            }

        }
        public virtual decimal LastAutoSellPrice
        {
            get
            {
                return _lastautosellprice;
            }
            set
            {
                _lastautosellprice = value;
            }

        }
        #endregion

        #region Public Functions

        #endregion //Public Functions

        #region IEquatable members

        public virtual bool Equals(StkUseraccount other)
        {
            if (other == this)
                return true;

            return (other != null) &&
                (this._userid == other.UserId);

        }

        #endregion

    }
}
